package com.fjnu.dao.impl;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.fjnu.dao.IExamRepairDao;
import com.fjnu.dao.common.BaseDaoImpl;
import com.fjnu.dao.common.DaoException;
import com.fjnu.entities.ExamRepair;
import com.fjnu.entities.User;
@Repository
public class ExamRepairDao extends BaseDaoImpl<ExamRepair> implements IExamRepairDao {


	public List<ExamRepair> findExamRepair(Integer pageNo,Integer pageSize) {
		String hql="from ExamRepair";
		List<ExamRepair> list = queryPage(hql, pageNo, pageSize);
		if(list.size()==0){
			throw new DaoException("报修单为空");
		}
		return list;
	}


	public void updateExamRepair(ExamRepair examRepair) {
		update(examRepair);;

	}


	public void addExamRepair(ExamRepair examRepair) {
		save(examRepair);

	}

	public ExamRepair findUniqueExamRepair(int id) {
		
		return findById(id);
	}

}
